package wai.school.ui;

import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;

import butterknife.Bind;
import wai.school.BaseActivity;
import wai.school.R;
import wai.school.method.MainAdapter;

public class MainActivity extends BaseActivity {

    private MainAdapter mAdapter;
    @Bind(R.id.tab_pager)
    ViewPager tabPager;
    @Bind(R.id.bottom_tab)
    TabLayout bottomTab;
    public static MainActivity admin;

    @Override
    public int setLayout() {
        return R.layout.activity_main;
    }

    @Override
    public void initViews() {
        mAdapter = new MainAdapter(getSupportFragmentManager());
        tabPager.setAdapter(mAdapter);
        tabPager.setOffscreenPageLimit(5);
        bottomTab.setupWithViewPager(tabPager);
        admin = this;
    }

    @Override
    public void initEvents() {

    }
}
